Using the file dl-matrixmarket.jl from the package MatrixMarket.jl (copy the file to your notebook), download two randomly chosen matrices.
For each matrix:
spy()
from the package Gadfly.jl
,Hints
In Windows, you may need to prepend the http://
to the address in the
download()
command.
To plot the matrix A
, use the following commands:
myplot=spy(A)
draw(PNG(12cm,12cm),myplot)
To see only the structure, use
myplot=spy(map(Int64,A.!=0.0))
For larger matrices, plotting takes a while.
Choose an image from the package TestImages.jl or find an image elsewhere.
Compute low-rank aproximations of the image and display them using @manipulate
.
In [ ]: